package com.xuecheng.content.interfaces.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

/**
 * @Author: LiJunXi
 * @Description:
 * @Date: 2024-08-20  21:50
 */
@Api(tags = "测试接口")
@RestController
@RequestMapping("/test")
public class TestApi {

    @ApiOperation("测试模板引擎")
    @GetMapping("/freemarker")
    public ModelAndView test(){
        ModelAndView modelAndView = new ModelAndView();
        modelAndView.setViewName("test");
        modelAndView.addObject("name", "Jixer");
        return modelAndView;
    }
}
